During a long running program execution by a computing device, it is useful to provide a user of the computing device with a progress indicator to keep the user informed of the progress of the program execution. One method used for such visualization is a progress bar displayed on the computing device. A progress bar is typically a horizontal bar that visually shows the completion percentage by painting a larger portion of the bar as the progress is completed. In order to display informative progress, the computing device must be able to determine at any point in time what percent of program execution has been completed. This percentage is fed into the progress widget to determine the visualization. In the case of a progress bar, the completion percentage is used to determine how much of the bar is painted.
In many cases, a determination by the computing device of a completion percentage of a program execution isn't all that difficult. For example, when the program execution consists of numerous individual small steps, the computing device simply takes the number of steps completed and divide by the total number of steps to obtain a percentage. Certain special cases such as a file transfer are also handled fairly easily by computing devices when the total file size is known by the computing device whereby the computing device knows how much of the file has been received and divides that amount received by the total file size. However, when the program execution consists of large long running steps and/or a file transfer of an unknown size, then a determination by the computing device of a completion percentage of the program execution at any point in time becomes more difficult.
This difficulty in determining the completion percentage of the program execution at any point in time can result in a progress displayed that is too coarse in the context of spending long amounts of time at one percentage and then jumping forward in one big step to another percentage. Another resulting problem is the progress may not monotonically increase whereby the user may think progress up to that point is being undone. An additional resulting problem can be a grossly inaccurate progress display. This can be detrimental to the user, because it may be important to be as accurate as possible to enable a user to complete or initiate other tasks during the program execution.